package flirtme.model;

import java.util.ArrayList;
import java.util.Observable;

import org.jivesoftware.smack.packet.Message;

import android.widget.TextView;

import flirtme.constants.Constants;

public class ContactModel {

	protected String username;
	protected String imageUrl;
	protected String distance;
	protected ArrayList<Message> messages = new ArrayList<Message>();
	protected String email;
	private int numberOfMessagesNotReaded = 0;
	private String birthDate;
	private String age;
	private String interests;
	private String firstname;
	private String gender;

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public String getFirstname() {
		return firstname;
	}

	public void setFirstname(String firstname) {
		this.firstname = firstname;
	}

	public String getLastname() {
		return lastname;
	}

	public void setLastname(String lastname) {
		this.lastname = lastname;
	}
	private String lastname;

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public void queueMessage(Message msg) {
		this.messages.add(msg);
	}

	public ArrayList<Message> getMessages() {
		return this.messages;
	}

	public String getImageUrl() {
		return imageUrl;
	}

	public void setImageUrl(String imageUrl) {
		this.imageUrl = imageUrl;
	}

	public String getDistance() {
		return distance;
	}

	public void setDistance(String distance) {
		this.distance = distance;
	}

	public void setEmail(String email) {
		this.email = email;

	}

	public String getChatEmail() {
		return this.username + "@" + Constants.HOST
				+ Constants.CHAT_SERVER_PATH;

	}

	public String getEmail() {
		return email;
	}

	public void queueMessageAndNotify(Message message) {
		this.queueMessage(message);
	}

	public void incrementNumberOfMessagesNotReaded() {
		numberOfMessagesNotReaded++;
	}

	public int getNumberOfMessagesNotReaded() {
		return numberOfMessagesNotReaded;
	}

	public void setNumberOfMessagesNotReaded(int number) {
		 numberOfMessagesNotReaded = number;
	}

	public void resetNumberOfMessagesNotReaded() {
		numberOfMessagesNotReaded = 0;
	}

	public void setAge(String age) {
		this.age = age;
		
	}

	public void setBirthDate(String birthDate) {
		this.birthDate = birthDate;
		
	}
	
	public String getBirthDate() {
		return this.birthDate;
	}
	
	public void setInterests (String interests) {
		this.interests = interests;
	}
	public String getInterests() {
		return this.interests;
	}
	public String getAge() {
		return this.age;
	}

}